<?php
/**
 *	KLF Framework
 *
 *	@author Kristian Oye <kristianoye@gmail.com> 
 *	@copyright (C) 2010-2011, Kristian Oye
 */
namespace KLF\System\Web\Routing
{
	use KLF\System\Collections\KDictionary as KDictionary;
	
	/**
	 *  Class KRouteDictionary
	 *
	 *  @package KLF\System\Web\Routing
	 *  @access public
	 *  @author Kristian Oye <kristianoye@gmail.com>
	 *  @since 0.1
	 *  
	 *  @method KRouteDictionary NewInstance
	 */
	class KRouteDictionary extends KDictionary 
	{
		/**
		 * Constructs a new KRouteDictionary object.
		 *
		 * @author Kristian Oye <kristianoye@gmail.com>
		 * @since 0.1
		*/
		public function __construct()
		{
			parent::__construct('string', null);
		}
		
		protected function GetNormalizedKey($key)
		{
			return strtolower($key);
		}
		
		public function TryGetValue($key, &$parm)
		{
			if ($this->ContainsKey($key))
			{
				$parm = $this[$key];
				return true;
			}
			return false;
		}
	}
}
